Inside Macintosh: QuickTime Components

Previous | Chapter Top | Chapter Contents | Next

Media Handler Components

Media handler components allow the Movie Toolbox to play a movie's data. The Movie Toolbox, by itself, cannot read or write movie data. Rather, media handlers perform input and output services on behalf of the Movie Toolbox. The Movie Toolbox gains access to the appropriate media handler for a particular movie track by examining the track's media. That data structure identifies the media handler that created and maintains the media (see the chapter "Movie Toolbox" in Inside Macintosh: QuickTime for more information about the relationship between a movie, its tracks, and each track's media).

Each media handler is primarily responsible for understanding the format and content of the media type it supports. The media handler is intimately familiar with the sample structure used in its media, the compression techniques used to store the media's sample data, and the performance characteristics of the device that stores the media.

During movie playback, the media handler draws its media's data on the screen and plays the media's sounds. The media handler may use the services of other managers such as the Image Compression Manager for compressed image data and the Sound Manager for sound data. When an application creates a movie, media handlers store the movie's data. The actual reading and writing of media data are performed by another component, the data handler. For details on the Image Compression Manager, see Inside Macintosh: QuickTime . For more on the Sound Manager, see Inside Macintosh: More Macintosh Toolbox .

Applications never directly use the services of media handlers. The Movie Toolbox controls all movie data storage and retrieval on behalf of QuickTime applications.

Figure 10-1 shows the logical relationships between applications, the Movie Toolbox, media handlers, and data handlers.

Figure 1 Logical relationships between the Movie Toolbox and media handlers

Apple had three primary goals for isolating the Movie Toolbox and QuickTime applications from the details of media data access. First, the isolation allows programmers who develop the Movie Toolbox and QuickTime applications to focus on the specifics of the problems they are addressing, freed from concerns about data access. Second, this architecture allows QuickTime to be easily extended to accommodate new storage devices and technologies. Third, by documenting the media handler interface, developers can create their own, special-purpose media handlers that work with QuickTime.


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next